#pragma once

#include <QObject>
#include <gp_Pnt.hxx>
#include <Standard_Handle.hxx>
#include "FeatureShape/FeatureShape.h"
#include <set>

class QSketchManager;
class QIVtkSelectionPipeline;

class QSketch  : public QObject
{
	Q_OBJECT

	friend class QSketchManager;

public:
	QSketch(QObject *parent, const gp_Pnt& O, const gp_Dir& N, const gp_Dir& Right);
	~QSketch();

	void AddSketchCurve(Handle(QIVtkSelectionPipeline) actor)
	{
		m_actors.push_back(actor);
	}

	gp_Trsf GetGlobalToLocalTransform();
	gp_Trsf GetLocalToGlobalTransform();

protected:
	gp_Pnt m_O; // 原点
	gp_Dir m_N; // 法向量
	gp_Dir m_R; // 右向量

	// 创建的全部actor--草图创建会赋值，结束时会清空
	std::vector<Handle(QIVtkSelectionPipeline)> m_actors;
	std::vector<std::shared_ptr<FeatureShape>> m_featureShapes;
	// 被删除的actor
    std::vector<Handle(QIVtkSelectionPipeline)> m_deletedActors;
};
